home *** CD-ROM | disk | FTP | other *** search
- Path: newsfeed.internetmci.com!xmission!news
- From: tknarr@xmission.com ( Todd Knarr )
- Newsgroups: comp.lang.c++
- Subject: Re: C++ Vs. C & Efficiency
- Date: 13 Jan 1996 02:34:28 GMT
- Organization: Chaos Central
- Message-ID: <4d75nk$c12@news.xmission.com>
- References: <4d5qg1$3fa@news1.usa.pipeline.com> <30F705F9.403F@iastate.edu>
- Reply-To: tknarr@xmission.com ( Todd Knarr )
- NNTP-Posting-Host: slc50.xmission.com
- X-Newsreader: IBM NewsReader/2 v1.2
-
- In <30F705F9.403F@iastate.edu>, Steve Lee <sjlee@iastate.edu> writes:
- >
- >What about the overhead incurred with exception handling and templates? Also,
-
- There's no overhead to exception handling unless you use it. As for templates,
- they have precisely the same overhead as an ordinary class.
-
- >doesn't object-oriented programming (referring to C++) tend to have more function
- >call overhead than structured programming (referring to C)?
-
- Depending on how you write it. Judicious use of inline member functions can
- reduce the function-call overhead in the cases where it matters without
- sacrificing type-checking in the process.
-
- As for performance, I've found that in most cases the extra overhead does
- not kill performance. Stupid selection of algorithms and overall concept
- does far more damage. Generally I consider it something to worry about after
- I've got it compiled, debugged and running clean and can accurately time and
- profile it.
-
- --
- Todd Knarr : tknarr@xmission.com | finger for PGP public key
- | Member, USENET Cabal
-
- Seriously, I don't want to die just yet. I don't care how
- good-looking they are, I! don't! want! to! die!"
- -- Megazone ( UF1 )
-
-